{extend name="admin@common/main"/}
{block name="body"}
    <div class="main-title">
        <h2>{:lang('_PACK_STEP_TWO_')}
            <small>{:lang('_PACK_STEP_TWO_VICE_')}</small>
        </h2>
    </div>

    <div class="with-padding">
        <div class="clearfix">

            <div class="alert alert-info">
                {:lang('_PACK_MODULE_NOW_')}{:lang('_COMMA_')}<strong>{$module.alias}-{$module.name}</strong>
            </div>
        </div>
        <form action="{:url('module3')}" method="post">
            <div class="clearfix">
                {notempty name="rules"}
                    <div class="col-xs-12">
                        <p class="lead">{:lang('_PACK_SYSTEM_DETECTED_AUTHORITY_')}</p>
                        <p>{:lang('_PACK_AUTHORITY_CHECK_')}</p>
                        <blockquote>
                            {volist name="rules" id="one"}
                                <p><label><input type="checkbox" name="default[]" value="{$one.name}"> <span class="text-primary">【{$one.id}】-{$one.title} </span>&nbsp;&nbsp;&nbsp; {$one.name}</label></p>
                            {/volist}
                        </blockquote>
                        
                    </div>
                    <div class="col-xs-12">
                        <p class="lead">{:lang('_PACK_SCRIPT_PREVIEW_')}</p>
                    <textarea name="auth_rule" class="form-control" style="height: 200px">{:json_encode($rules)}</textarea>
                    </div>
                {else/}
                    <div class="alert alert-success">{:lang('_PACK_SYSTEM_DETECTED_AUTHORITY_SKIP_')}</div>
                {/notempty}

            </div>

            <div class="clearfix" style="margin-top:10px;">
                <a class="btn btn-lg btn-default" href="{:url('module1')}">
                    {:lang('_STEP_PREV_')}
                </a>
                <a class="btn btn-lg btn-default" href="{:url('module2')}">
                    <i class="icon-refresh"></i> {:lang('_DETECT_RE_')}
                </a>
                <button type="submit" id="next_step" style="width: 300px" class="btn btn-lg btn-success">
                    {:lang('_STEP_NEXT_')}
                </button>
            </div>
        </form>
    </div>
{/block}